#include "qdisplayreport.h"

QDisplayReport::QDisplayReport(ReportFile* file,QWidget*parent)
   : QWidget(parent),m_report(file)
{
	ui.setupUi(this);
}

QDisplayReport::~QDisplayReport()
{
}



void QDisplayReport::display()
{
	ui.report->clear();
	if(m_report)
	{
		QStringList all = m_report->getAllReport();
		QStringList session = m_report->getReportSession();
		foreach(QString line,all)
		{
			if(session.contains(line))
				ui.report->setTextColor(QColor(0x6593CF));
			else
				ui.report->setTextColor(QColor(0x9E9E9E));
			ui.report->append(line);
		}
	}
	show();
}